﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;

namespace Admin.NET.Application;

/// <summary>
/// 号船分析基础输入参数
/// </summary>
public class PlanSharpBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 船坞
    /// </summary>
    public virtual string? Dock { get; set; }
    
    /// <summary>
    /// 批次
    /// </summary>
    public virtual string? Batch { get; set; }
    
    /// <summary>
    /// 船级社
    /// </summary>
    public virtual string? ClassificationSociety { get; set; }
    
    /// <summary>
    /// 船型
    /// </summary>
    public virtual string? ShipType { get; set; }
    
    /// <summary>
    /// 船东
    /// </summary>
    public virtual string? ShipOwner { get; set; }
    
    /// <summary>
    /// 坞前
    /// </summary>
    public virtual string? DockBefore { get; set; }
    
    /// <summary>
    /// 坞后
    /// </summary>
    public virtual string? DockAfter { get; set; }
    
    /// <summary>
    /// 船号
    /// </summary>
    [Required(ErrorMessage = "船号不能为空")]
    public virtual string Ch { get; set; }
    
    /// <summary>
    /// 开工
    /// </summary>
    [Required(ErrorMessage = "开工不能为空")]
    public virtual DateTime StartSharpTime { get; set; }
    
    /// <summary>
    /// 下坞
    /// </summary>
    [Required(ErrorMessage = "下坞不能为空")]
    public virtual DateTime? OffDockTime { get; set; }
    
    /// <summary>
    /// 起浮
    /// </summary>
    [Required(ErrorMessage = "起浮不能为空")]
    public virtual DateTime? FloatTime { get; set; }
    
    /// <summary>
    /// 分段量
    /// </summary>
    [Required(ErrorMessage = "分段量不能为空")]
    public virtual int? FdTotal { get; set; }
    
    /// <summary>
    /// 本部
    /// </summary>
    [Required(ErrorMessage = "本部不能为空")]
    public virtual int? SwsInt { get; set; }
    
    /// <summary>
    /// 外协
    /// </summary>
    public virtual int? OtherInt { get; set; }
    
    /// <summary>
    /// 最早计划
    /// </summary>
    public virtual DateTime? FirstPStrTime { get; set; }
    
    /// <summary>
    /// 最早开工
    /// </summary>
    public virtual DateTime? FirstStrTime { get; set; }
    
    /// <summary>
    /// 最后结束
    /// </summary>
    public virtual DateTime? LastEndTime { get; set; }
    
    /// <summary>
    /// 进度
    /// </summary>
    public virtual decimal? Jindu { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(FinishStatusEnum), AllowNullValue=true)]
    public virtual FinishStatusEnum? StatusAll { get; set; }
    
}

/// <summary>
/// 号船分析分页查询输入参数
/// </summary>
public class PagePlanSharpInput : BasePageInput
{
    /// <summary>
    /// 船坞
    /// </summary>
    public string? Dock { get; set; }
    
    /// <summary>
    /// 批次
    /// </summary>
    public string? Batch { get; set; }
    
    /// <summary>
    /// 船级社
    /// </summary>
    public string? ClassificationSociety { get; set; }
    
    /// <summary>
    /// 船型
    /// </summary>
    public string? ShipType { get; set; }
    
    /// <summary>
    /// 船东
    /// </summary>
    public string? ShipOwner { get; set; }
    
    /// <summary>
    /// 坞前
    /// </summary>
    public string? DockBefore { get; set; }
    
    /// <summary>
    /// 坞后
    /// </summary>
    public string? DockAfter { get; set; }
    
    /// <summary>
    /// 船号
    /// </summary>
    public string Ch { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(FinishStatusEnum), AllowNullValue=true)]
    public FinishStatusEnum? StatusAll { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 号船分析增加输入参数
/// </summary>
public class AddPlanSharpInput
{
    /// <summary>
    /// 船坞
    /// </summary>
    [MaxLength(32, ErrorMessage = "船坞字符长度不能超过32")]
    public string? Dock { get; set; }
    
    /// <summary>
    /// 批次
    /// </summary>
    [MaxLength(64, ErrorMessage = "批次字符长度不能超过64")]
    public string? Batch { get; set; }
    
    /// <summary>
    /// 船级社
    /// </summary>
    [MaxLength(64, ErrorMessage = "船级社字符长度不能超过64")]
    public string? ClassificationSociety { get; set; }
    
    /// <summary>
    /// 船型
    /// </summary>
    [MaxLength(64, ErrorMessage = "船型字符长度不能超过64")]
    public string? ShipType { get; set; }
    
    /// <summary>
    /// 船东
    /// </summary>
    [MaxLength(64, ErrorMessage = "船东字符长度不能超过64")]
    public string? ShipOwner { get; set; }
    
    /// <summary>
    /// 坞前
    /// </summary>
    [MaxLength(64, ErrorMessage = "坞前字符长度不能超过64")]
    public string? DockBefore { get; set; }
    
    /// <summary>
    /// 坞后
    /// </summary>
    [MaxLength(64, ErrorMessage = "坞后字符长度不能超过64")]
    public string? DockAfter { get; set; }
    
    /// <summary>
    /// 船号
    /// </summary>
    [Required(ErrorMessage = "船号不能为空")]
    [MaxLength(32, ErrorMessage = "船号字符长度不能超过32")]
    public string Ch { get; set; }
    
    /// <summary>
    /// 开工
    /// </summary>
    [Required(ErrorMessage = "开工不能为空")]
    public DateTime StartSharpTime { get; set; }
    
    /// <summary>
    /// 下坞
    /// </summary>
    [Required(ErrorMessage = "下坞不能为空")]
    public DateTime? OffDockTime { get; set; }
    
    /// <summary>
    /// 起浮
    /// </summary>
    [Required(ErrorMessage = "起浮不能为空")]
    public DateTime? FloatTime { get; set; }
    
    /// <summary>
    /// 分段量
    /// </summary>
    [Required(ErrorMessage = "分段量不能为空")]
    public int? FdTotal { get; set; }
    
    /// <summary>
    /// 本部
    /// </summary>
    [Required(ErrorMessage = "本部不能为空")]
    public int? SwsInt { get; set; }
    
    /// <summary>
    /// 外协
    /// </summary>
    public int? OtherInt { get; set; }
    
    /// <summary>
    /// 最早计划
    /// </summary>
    public DateTime? FirstPStrTime { get; set; }
    
    /// <summary>
    /// 最早开工
    /// </summary>
    public DateTime? FirstStrTime { get; set; }
    
    /// <summary>
    /// 最后结束
    /// </summary>
    public DateTime? LastEndTime { get; set; }
    
    /// <summary>
    /// 进度
    /// </summary>
    public decimal? Jindu { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(FinishStatusEnum), AllowNullValue=true)]
    public FinishStatusEnum? StatusAll { get; set; }
    
}

/// <summary>
/// 号船分析删除输入参数
/// </summary>
public class DeletePlanSharpInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 号船分析更新输入参数
/// </summary>
public class UpdatePlanSharpInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 船坞
    /// </summary>
    [MaxLength(32, ErrorMessage = "船坞字符长度不能超过32")]
    public string? Dock { get; set; }
    
    /// <summary>
    /// 批次
    /// </summary>
    [MaxLength(64, ErrorMessage = "批次字符长度不能超过64")]
    public string? Batch { get; set; }
    
    /// <summary>
    /// 船级社
    /// </summary>
    [MaxLength(64, ErrorMessage = "船级社字符长度不能超过64")]
    public string? ClassificationSociety { get; set; }
    
    /// <summary>
    /// 船型
    /// </summary>
    [MaxLength(64, ErrorMessage = "船型字符长度不能超过64")]
    public string? ShipType { get; set; }
    
    /// <summary>
    /// 船东
    /// </summary>
    [MaxLength(64, ErrorMessage = "船东字符长度不能超过64")]
    public string? ShipOwner { get; set; }
    
    /// <summary>
    /// 坞前
    /// </summary>
    [MaxLength(64, ErrorMessage = "坞前字符长度不能超过64")]
    public string? DockBefore { get; set; }
    
    /// <summary>
    /// 坞后
    /// </summary>
    [MaxLength(64, ErrorMessage = "坞后字符长度不能超过64")]
    public string? DockAfter { get; set; }
    
    /// <summary>
    /// 船号
    /// </summary>    
    [Required(ErrorMessage = "船号不能为空")]
    [MaxLength(32, ErrorMessage = "船号字符长度不能超过32")]
    public string Ch { get; set; }
    
    /// <summary>
    /// 开工
    /// </summary>    
    [Required(ErrorMessage = "开工不能为空")]
    public DateTime StartSharpTime { get; set; }
    
    /// <summary>
    /// 下坞
    /// </summary>    
    [Required(ErrorMessage = "下坞不能为空")]
    public DateTime? OffDockTime { get; set; }
    
    /// <summary>
    /// 起浮
    /// </summary>    
    [Required(ErrorMessage = "起浮不能为空")]
    public DateTime? FloatTime { get; set; }
    
    /// <summary>
    /// 分段量
    /// </summary>    
    [Required(ErrorMessage = "分段量不能为空")]
    public int? FdTotal { get; set; }
    
    /// <summary>
    /// 本部
    /// </summary>    
    [Required(ErrorMessage = "本部不能为空")]
    public int? SwsInt { get; set; }
    
    /// <summary>
    /// 外协
    /// </summary>    
    public int? OtherInt { get; set; }
    
    /// <summary>
    /// 最早计划
    /// </summary>    
    public DateTime? FirstPStrTime { get; set; }
    
    /// <summary>
    /// 最早开工
    /// </summary>    
    public DateTime? FirstStrTime { get; set; }
    
    /// <summary>
    /// 最后结束
    /// </summary>    
    public DateTime? LastEndTime { get; set; }
    
    /// <summary>
    /// 进度
    /// </summary>    
    public decimal? Jindu { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    [Dict(nameof(FinishStatusEnum), AllowNullValue=true)]
    public FinishStatusEnum? StatusAll { get; set; }
    
}

/// <summary>
/// 号船分析主键查询输入参数
/// </summary>
public class QueryByIdPlanSharpInput : DeletePlanSharpInput
{
}

/// <summary>
/// 号船分析数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportPlanSharpInput : BaseImportInput
{
    /// <summary>
    /// 船坞
    /// </summary>
    [ImporterHeader(Name = "船坞")]
    [ExporterHeader("船坞", Format = "", Width = 25, IsBold = true)]
    public string? Dock { get; set; }
    
    /// <summary>
    /// 批次
    /// </summary>
    [ImporterHeader(Name = "批次")]
    [ExporterHeader("批次", Format = "", Width = 25, IsBold = true)]
    public string? Batch { get; set; }
    
    /// <summary>
    /// 船级社
    /// </summary>
    [ImporterHeader(Name = "船级社")]
    [ExporterHeader("船级社", Format = "", Width = 25, IsBold = true)]
    public string? ClassificationSociety { get; set; }
    
    /// <summary>
    /// 船型
    /// </summary>
    [ImporterHeader(Name = "船型")]
    [ExporterHeader("船型", Format = "", Width = 25, IsBold = true)]
    public string? ShipType { get; set; }
    
    /// <summary>
    /// 船东
    /// </summary>
    [ImporterHeader(Name = "船东")]
    [ExporterHeader("船东", Format = "", Width = 25, IsBold = true)]
    public string? ShipOwner { get; set; }
    
    /// <summary>
    /// 坞前
    /// </summary>
    [ImporterHeader(Name = "坞前")]
    [ExporterHeader("坞前", Format = "", Width = 25, IsBold = true)]
    public string? DockBefore { get; set; }
    
    /// <summary>
    /// 坞后
    /// </summary>
    [ImporterHeader(Name = "坞后")]
    [ExporterHeader("坞后", Format = "", Width = 25, IsBold = true)]
    public string? DockAfter { get; set; }
    
    /// <summary>
    /// 船号
    /// </summary>
    [ImporterHeader(Name = "*船号")]
    [ExporterHeader("*船号", Format = "", Width = 25, IsBold = true)]
    public string Ch { get; set; }
    
    /// <summary>
    /// 开工
    /// </summary>
    [ImporterHeader(Name = "*开工")]
    [ExporterHeader("*开工", Format = "yyyy-MM-dd", Width = 25, IsBold = true)]
    public DateTime StartSharpTime { get; set; }
    
    /// <summary>
    /// 下坞
    /// </summary>
    [ImporterHeader(Name = "*下坞")]
    [ExporterHeader("*下坞", Format = "yyyy-MM-dd", Width = 25, IsBold = true)]
    public DateTime? OffDockTime { get; set; }
    
    /// <summary>
    /// 起浮
    /// </summary>
    [ImporterHeader(Name = "*起浮")]
    [ExporterHeader("*起浮", Format = "yyyy-MM-dd", Width = 25, IsBold = true)]
    public DateTime? FloatTime { get; set; }
    
    /// <summary>
    /// 分段量
    /// </summary>
    [ImporterHeader(Name = "*分段量")]
    [ExporterHeader("*分段量", Format = "", Width = 25, IsBold = true)]
    public int? FdTotal { get; set; }
    
    /// <summary>
    /// 本部
    /// </summary>
    [ImporterHeader(Name = "*本部")]
    [ExporterHeader("*本部", Format = "", Width = 25, IsBold = true)]
    public int? SwsInt { get; set; }
    
    /// <summary>
    /// 外协
    /// </summary>
    [ImporterHeader(Name = "外协")]
    [ExporterHeader("外协", Format = "", Width = 25, IsBold = true)]
    public int? OtherInt { get; set; }
    
    /// <summary>
    /// 最早计划
    /// </summary>
    [ImporterHeader(Name = "最早计划")]
    [ExporterHeader("最早计划", Format = "yyyy-MM-dd", Width = 25, IsBold = true)]
    public DateTime? FirstPStrTime { get; set; }
    
    /// <summary>
    /// 最早开工
    /// </summary>
    [ImporterHeader(Name = "最早开工")]
    [ExporterHeader("最早开工", Format = "yyyy-MM-dd", Width = 25, IsBold = true)]
    public DateTime? FirstStrTime { get; set; }
    
    /// <summary>
    /// 最后结束
    /// </summary>
    [ImporterHeader(Name = "最后结束")]
    [ExporterHeader("最后结束", Format = "yyyy-MM-dd", Width = 25, IsBold = true)]
    public DateTime? LastEndTime { get; set; }
    
    /// <summary>
    /// 进度
    /// </summary>
    [ImporterHeader(Name = "进度")]
    [ExporterHeader("进度", Format = "", Width = 25, IsBold = true)]
    public decimal? Jindu { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public FinishStatusEnum? StatusAll { get; set; }
    
}
